#include <QApplication>
#include <QDateTime>
#include <QUrl>
#include <QUrlQuery>
#include <qdebug.h>


int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    QString createdAt = "2024-03-29T08:26:50+00:00";
    // auto dt = QDateTime::fromString(createdAt, "yyyy-MM-ddTHH:mm:ss+zzz");
    auto dt = QDateTime::fromString(createdAt, Qt::ISODateWithMs);
    qDebug() << dt;


    QString s = "https://cpu.bmcx.com/web_system/bmcx_com_www/system/file/cpu/get_data/?lx=cpu&s=201&e=999999999&ajaxtimestamp=1725782433303";
    qDebug() << QUrl(s).query();
    // QUrlQuery query = QUrlQuery(QUrl(s).query());
    // qDebug() << query.query();

    QUrl url(s);

    QUrl u = url;
    u.setQuery(url.query());


    QUrlQuery m_query;
    m_query.addQueryItem("x",  "v");
    u.setQuery(m_query);

    qDebug() << u.query();

    return 0;
}
